Conventionally, as a system for allowing a user to virtually experience sports, a virtual sports system for executing processing for a tennis game by recognizing an actual swing of a tennis racket is disclosed (for example, Japanese Laid-Open Patent Publication No. 2003-180896). The racket used for this virtual sports system includes a three-axial acceleration sensor and a three-axial angular velocity sensor. The acceleration sensor is used for recognizing the initial position of the racket, and the angular velocity sensor is used for recognizing a posture change of the racket caused by a stroke.
However, the above-described game has the following problems. Sensors, such as the above-described acceleration sensor and angular velocity sensor, even having a very high level of precision, generate certain errors. For example, it is assumed that angular velocities obtained by the angular velocity sensor are accumulated and integrated to calculate a posture change. In this case, as the angular velocities are accumulated for a longer time, more errors are accumulated in the angular velocity sensor. This results in a large error. Namely, the actual posture change and the calculated posture change are often significantly different from each other. In general, such a problem caused by an influence of an error is often avoided by the player making an operation of resetting the initial position (initial posture) at which the angular velocities start being accumulated, when necessary.
However, the above-described resetting operation is performed when the player considers or determines necessary, regardless of whether the resetting is actually necessary or not. Therefore, the resetting operation may not be made at an appropriate timing as follows, for example: the resetting operation is not made although errors are accumulated to be of a large level and the resetting operation is necessary, or resetting operation is made although errors are not accumulated to be of a large level and the resetting operation is not necessary.
Therefore, an object of the present invention is to provide a computer readable storage medium having stored thereon an information processing program for executing posture control processing, which is capable of appropriately presenting the player with the timing to make a resetting operation on the basic posture, and an information processing apparatus for such an information processing program.
The present invention has the following features to attain the objects mentioned above. The reference numerals, additional descriptions and the like in parentheses in this section of the specification indicate an example of the correspondence with the embodiments described later for easier understanding of the present invention, and do not limit the present invention in any way.
A first aspect of the present invention is directed to a computer readable storage medium having stored thereon an information processing program to be executed by a computer of an information processing apparatus, the information processing program being for calculating a posture of an input device based on posture/motion information obtained from predetermined detection means for detecting a posture or a motion of the input device operated by a user. The information processing program causes the computer to function as posture/motion information obtaining means (S2), reference posture calculation means (S32), current posture calculation means (S141), posture difference calculation means (S142, S143), re-calculation necessity degree calculation means (S136) and presentation means (S138). The posture/motion information obtaining means obtains posture/motion information detected by the detection means. The reference posture calculation means calculates, at a predetermined timing, a posture of the input device at the timing as reference posture data based on the posture/motion information. The current posture calculation means repeatedly calculates a posture of the input device after the reference posture is calculated, as current posture data based on the posture/motion information. The posture difference calculation means repeatedly calculates a difference between the posture represented by the reference posture data and the posture represented by the current posture data as posture difference data based on the reference posture data and the current posture data. The re-calculation necessity degree calculation means repeatedly calculates, by accumulation, a re-calculation necessity degree, which represents a necessity degree of re-calculation of the reference posture, based on the posture/motion information obtained by the posture/motion information obtaining means and the posture difference data. The presentation means makes a presentation for urging re-calculation of the reference posture when the re-calculation necessity degree exceeds a predetermined value.
According to the first aspect, the presentation for urging the re-calculation of the reference posture can be made at an accurate timing.
In a second aspect based on the first aspect, the detection means is a motion sensor included in the input device.
According to the second aspect, the posture of the input device can be calculated more accurately.
In a third aspect based on the first aspect, the posture difference calculation means calculates the difference between a posture represented by the reference posture data and a posture represented by the current posture data as the posture difference data.
According to the third aspect, the necessity degree can be calculated using the posture difference. Therefore, the necessity degree can be calculated more accurately.
In a fourth aspect based on the first aspect, the re-calculation necessity degree calculation means calculates the re-calculation necessity degree to be larger as the posture difference calculated by the posture difference calculation means is larger.
In a fifth aspect based on the first aspect, the re-calculation necessity degree calculation means calculates the re-calculation necessity degree also based on a time period from when the reference posture data is calculated.
In a sixth aspect based on the first aspect, the re-calculation necessity degree calculation means calculates the re-calculation necessity degree to be larger as the motion of the input device represented by the posture/motion information has a smaller magnitude.
According to the fourth through sixth aspects, the presentation for urging the re-calculation of the reference posture can be made at a more accurate timing.
In a seventh aspect based on the first aspect, the re-calculation necessity degree calculation means calculates the re-calculation necessity degree also based on the current posture data.
According to the seventh aspect, the necessity degree can be calculated also in consideration of the state of the posture of the input device. Therefore, the presentation for urging the re-calculation of the reference posture can be made at a more accurate timing.
In an eighth aspect based on the first aspect, the re-calculation necessity degree calculation means calculates the re-calculation necessity degree to be larger as the posture represented by the current posture data is closer to a predetermined posture.
According to the eighth aspect, the presentation for urging the re-calculation of the reference posture can be made at a more accurate timing.
In a ninth aspect based on the first aspect, the information processing program causes the computer to further function as reset means (S34, S134) for resetting the re-calculation necessity degree at a predetermined timing.
According to the ninth aspect, the presentation for urging the re-calculation of the reference posture can be prevented from being made unnecessarily.
In a tenth aspect based on the ninth aspect, the reset means resets the re-calculation necessity degree when the reference posture calculation means calculates the reference posture.
According to the tenth aspect, it is made possible to have the player make the re-calculation of the reference posture at an arbitrary timing. Therefore, the presentation for urging the re-calculation of the reference posture can be prevented from being made unnecessarily.
In an eleventh aspect based on the ninth aspect, the reset means resets the re-calculation necessity degree when the motion of the input device represented by the posture/motion information obtained by the posture/motion information obtaining means has a magnitude equal to or greater than a predetermined value.
According to the eleventh aspect, the presentation for urging the re-calculation of the reference posture is not made while the input device is moved at a velocity equal to or greater than a certain level.
In a twelfth aspect based on the ninth aspect, the reset means resets the re-calculation necessity degree when the posture represented by the current posture data is a predetermined posture.
According to the twelfth aspect, it is made possible to prevent the presentation for urging the re-calculation of the reference posture when the input device has a posture far from a desirable posture for making the re-calculation of the reference posture.
In a thirteenth aspect based on the first aspect, the information processing apparatus further includes display means. The presentation means outputs a display for urging the re-calculation to the display means.
In a fourteenth aspect based on the first aspect, the information processing apparatus further includes audio signal output means. The presentation means outputs an audio signal for urging the re-calculation to the audio signal output means.
According to the thirteenth and fourteenth aspects, it is made possible to have the player intuitively perceive the necessity of the re-calculation of the reference posture.
In a fifteenth aspect based on the second aspect, the motion sensor includes at least one of an acceleration sensor and an angular velocity sensor. The posture/motion information includes at least one of acceleration information output from the acceleration sensor and angular velocity information output from the angular velocity sensor.
According to the fifteenth aspect, the necessity degree can be calculated more accurately.
In a sixteenth aspect based on the first aspect, the information processing program causes the computer to further function as game processing means for executing predetermined game processing when a posture represented by the reference posture data and a posture represented by the current posture data obtain a predetermined relationship.
According to the sixteenth aspect, the presentation for urging the re-calculation of the reference posture can be made at an appropriately timing in a game using the reference posture. This improves the convenience for the player and decreases the possibility of the game processing result unintended by the player being calculated.
A seventeenth aspect of the present invention is directed to an information processing apparatus for calculating a posture of an input device based on posture/motion information obtained from predetermined detection means for detecting a posture or a motion of the input device operated by a user. The information processing apparatus comprises posture/motion information obtaining means (10), reference posture calculation means (10), current posture calculation means (10), posture difference calculation means (10), re-calculation necessity degree calculation means (10) and presentation means. The posture/motion information obtaining means obtains posture/motion information detected by the detection means. The reference posture calculation means calculates, at a predetermined timing, a posture of the input device at the timing as reference posture data based on the posture/motion information. The current posture calculation means repeatedly calculates a posture of the input device after the reference posture is calculated, as current posture data based on the posture/motion information. The posture difference calculation means repeatedly calculates a difference between the posture represented by the reference posture data and the posture represented by the current posture data as posture difference data based on the reference posture data and the current posture data. The re-calculation necessity degree calculation means repeatedly calculates, by accumulation, a re-calculation necessity degree, which represents a necessity degree of re-calculation of the reference posture, based on the posture/motion information obtained by the posture/motion information obtaining means and the posture difference data. The presentation means makes a presentation for urging re-calculation of the reference posture when the re-calculation necessity degree exceeds a predetermined value.
According to the seventeenth aspect, the same effect as provided by the first aspect can be provided.
According to the present invention, it is made possible to inform the player that a resetting operation on a basic posture should be made at an effective timing.
These and other objects, features, aspects and effects of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.